label: Ignore setting attrs from NULL to NULL
authorTimm Bäder <mail@baedert.org>
Fri, 17 Apr 2020 05:37:22 +0000 (07:37 +0200)
committerTimm Bäder <mail@baedert.org>
Fri, 17 Apr 2020 13:21:00 +0000 (15:21 +0200)
gtk/gtklabel.c

index a2ffff86aca3e344e8f3d5a0b5a16668b888a40c..33d5d7cc2bf30be1f69b222d651d454cdbc7ee6f 100644 (file)
@@ -1793,6 +1793,11 @@ gtk_label_set_attributes (GtkLabel         *self,
 {
   g_return_if_fail (GTK_IS_LABEL (self));
 
+  if (!attrs && !self->attrs)
+    return;
+
+  if (attrs == self->attrs) g_error ("Z");
+
   if (attrs)
     pango_attr_list_ref (attrs);